package routre

import (
	"fmt"
	"net/http"
	"wdc/atm"
	"wdc/bmi"
	"wdc/containers"
	database "wdc/databaas"
	"wdc/jiuba"
	"wdc/shuxue"
	"wdc/student"
)

func LuYou() {
amHere:
	for i := 0; i < 3; i++ {
		fmt.Println("-----------------------")
		var comand string
		fmt.Println("输入模块名字")
		fmt.Println("支持bmi,add,jianfa, chufa,chenfa,array,slice,jiuba,map,object,oob,api,db")
		fmt.Scanln(&comand)
		switch comand {
		case "bmi":
			bmi.BMI()
		case "add":
			shuxue.Add()
		case "jianfa":
			shuxue.Jianfa()
		case "chufa":
			shuxue.ChuFaDemo()
		case "chenfa":
			shuxue.Chengfa()
		case "array":
			containers.Suili()
		case "slice":
			containers.InserStudents()
		case "jiuba":
			jiuba.Jiuba()
		case "map":
			containers.QueryLuquxian()
		case "object":
			atm.ObjectDemo()
		case "oob":
			student.OOBDemo()
		case "db":
			database.Login()

		case "api":
			fmt.Println("服务器启动了")
			http.HandleFunc("/api/bmi ", bmi.BmiApt)
			http.ListenAndServe(":999", nil)
			break amHere
		}

	}

}
